class Solution {
public:
int numJewelsInStones(std::string J, std::string S) {
	if (J.size() == 0 || S.size() == 0)
		return 0;

	int numb = 0;
	char ch = '0';
	for (int i = 0; i<S.size(); i++)
	{
		ch = S.at(i);
		int pos = J.find(ch);
		if (pos >= 0)
			numb++;
	}
	return numb;
}
};